package demo.util;


/**
 * 返回结果
 * @param <T>
 */

public class Result<T> {

    private int code;

    private String msg;

    private T result;

    public Result(){}

    public Result(int code,String msg){
        this(code,msg,null);
    }
    public Result(int code,String msg,T result){
        this.code = code;
        this.msg = msg;
        this.result = result;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }


}
